package com.qianfeng.smartplatform.utils;/*
 *@Description:
 *@author:赵健
 *@Date:zjzzz 2022/9/7 16:20
 */

import com.qianfeng.smartplatform.pojo.SysUserInfo;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

public class SecurityUtils {
    public static SysUserInfo getLoginUser() {
        Object user = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest().getSession().getAttribute("user");
        return (SysUserInfo) user;
    }
}
